﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LCA.Community.DAL.Model;

namespace LCA.Community.DAL.Test.ModelFactories
{
    public class AnswerVotesFactory
    {
        public AnswerVotesFactory()
        {

        }

        public AnswerVote CreatePositiveVote(string user, string answer)
        {
            var vote = CreateEntity(user, answer, 1);

            return vote;
        }

        public AnswerVote CreateNegativeVote(string user, string answer)
        {
            var vote = CreateEntity(user, answer, -1);

            return vote;
        }

        public AnswerVote CreateEntity(string user, string answer, int value)
        {
            var vote = new AnswerVote(
                                answer,
                                user,
                                value
                            );
            vote.RowKey = Guid.NewGuid().ToString();

            return vote;
        }
    }
}
